package state;

import state.util.Hashtable;

public class LoadResourceCompleteListener {
  private String resourceName = null;
  private Hashtable data = new Hashtable();

  public LoadResourceCompleteListener(String resourceName1) {
    this.resourceName = resourceName1;
  }

  public String getResourceName() {
    return resourceName;
  }

  public LoadResourceCompleteListener putInt(String name, int value) {
    data.put(name, new Integer(value));
    return this;
  }

  public LoadResourceCompleteListener putDouble(String name, float value) {
    data.put(name, new Float(value));
    return this;
  }

  public LoadResourceCompleteListener put(String name, Object value) {
    data.put(name, value);
    return this;
  }

  public Object get(String name) {
    return data.get(name);
  }

  public String getString(String name) {
    return String.valueOf(data.get(name));
  }

  public int getInt(String name) {
    return ((Integer) data.get(name)).intValue();
  }

  public float getDouble(String name) {
    return ((Float) data.get(name)).floatValue();
  }

  public void onLoadResourceDone(GameImage image) {
  }
}
